#!/bin/sh -e

# called by uscan with '--upstream-version' <version> <file>

# clean up the upstream tarball
unzip $3
tar -c -z -f ilf_$2.orig.tar.gz ilf-gpl-$2
rm -rf ilf-gpl-$2 $3

# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
  . .svn/deb-layout
  mv ilf_$2.orig.tar.gz $origDir
  echo "moved ilf_$2.orig.tar.gz to $origDir"
fi

exit 0

